package com.restcloud.pojo.MedicalRecordSummary;

import com.restcloud.pojo.Public.Code;
import com.restcloud.pojo.Public.Value;
import lombok.Data;

import javax.xml.bind.annotation.*;
import java.util.List;

@XmlAccessorType(XmlAccessType.FIELD)
@Data
public class MRSReceiver {

    public MRSReceiver() {
    }

    public MRSReceiver(String typeCode ,String contextControlCode) {
        this.typeCode = typeCode;
        if (!contextControlCode.equals("")){
            this.contextControlCode = contextControlCode;
        }
    }

    @XmlAttribute(name = "typeCode")
    private String typeCode;

    @XmlAttribute(name = "contextControlCode")
    private String contextControlCode;

    @XmlElement(name = "patientRole")
    private MRSDevice patientRole;

    @XmlElement(name = "time")
    private Value time;

    @XmlElement(name = "assignedAuthor")
    private MRSDevice assignedAuthor;

    @XmlElement(name = "assignedCustodian")
    private MRSDevice assignedCustodian;

    @XmlElement(name = "associatedEntity")
    private MRSDevice associatedEntity;

    @XmlElement(name = "parentDocument")
    private MRSDevice parentDocument;

    @XmlElement(name = "statusCode")
    private Code statusCode;

    @XmlElement(name = "structuredBody")
    private MRSReceiver structuredBody;

    private List<MRSReceiver> component;

    @XmlElement(name = "section")
    private MRSSession section;

    @XmlElement(name = "observation")
    private MRSDevice observation;

    @XmlElement(name = "organizer")
    private MRSDevice organizer;

}
